<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String message = (String) session.getAttribute("message");
    String detailMessage = (String) session.getAttribute("detailMessage");
    session.removeAttribute("message");
    session.removeAttribute("detailMessage");
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>上传结果 - 文件上传系统</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .result-container {
            max-width: 600px;
            background: white;
            border-radius: 15px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            overflow: hidden;
            text-align: center;
        }

        .result-header {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            color: white;
            padding: 30px;
        }

        .result-header i {
            font-size: 4em;
            margin-bottom: 20px;
        }

        .result-content {
            padding: 40px;
        }

        .result-message {
            font-size: 1.3em;
            margin-bottom: 20px;
            color: #495057;
        }

        .detail-message {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 8px;
            margin: 20px 0;
            text-align: left;
            max-height: 200px;
            overflow-y: auto;
        }

        .action-buttons {
            margin-top: 30px;
        }

        .action-btn {
            display: inline-block;
            margin: 0 10px;
            padding: 12px 30px;
            background: #007bff;
            color: white;
            text-decoration: none;
            border-radius: 25px;
            transition: all 0.3s ease;
        }

        .action-btn:hover {
            background: #0056b3;
            transform: translateY(-2px);
        }

        .action-btn.secondary {
            background: #6c757d;
        }

        .action-btn.secondary:hover {
            background: #5a6268;
        }
    </style>
</head>
<body>
<div class="result-container">
    <div class="result-header">
        <div>✅</div>
        <h2>上传完成</h2>
    </div>

    <div class="result-content">
        <div class="result-message">
            <%= message != null ? message : "上传操作已完成" %>
        </div>

        <% if (detailMessage != null && !detailMessage.isEmpty()) { %>
        <div class="detail-message">
            <%= detailMessage %>
        </div>
        <% } %>

        <div class="action-buttons">
            <a href="upload" class="action-btn">📤 继续上传</a>
            <a href="upload?action=list" class="action-btn secondary">📂 查看文件</a>
        </div>
    </div>
</div>
</body>
</html>